Intro to Integration

Bren Calculus Workshop


Nathaniel Grimes

Bren School of Environmental Science & Management

Last updated: Sep 16, 2024

Team Review

  • How did everyone feel about the problem set?

  • Any questions?

  • Discuss with Team

But first we’ll start with natural logarithms


  • Inverse of exponentials

By Definition

\[ \large e^{\ln(x)}=x \]

Properties

\(\ln (e^x)=x\)

\(\ln(xy)=\ln x+\ln y\)

\(\ln(\frac{x}{y})=\ln x-\ln y\)

\(\ln(x^y)=y \ln x\)

Derivative of Natural Log

\[ \large \frac{d}{dx}[\ln x]=\frac{1}{x} \]

Math uses:

  • Allows us to more easily handle exponents \((e^x)\)

  • Surprisingly simple derivative

  • Really important in Integration

Real World Uses

  • Time and Growth Problems

  • Differential Equations

Examples of Natural Logs


Solve for t in this equation:

\[ A=Pe^{rt} \]

\[ \begin{align} \frac{A}{P}&=e^{rt} \\ \ln(\frac{A}{P})&=rt \\ \frac{\ln(A)-\ln(P)}{r}&=t \end{align} \]

Find the Derivative


\[ \large y=\ln(x^2) \]

\[ \begin{align} y=\ln(u)& &u=x^2\\ \frac{dy}{du}&=\frac{1}{u} &\frac{du}{dx}=2x \\ \frac{dy}{du}\frac{du}{dx}&=\frac{2x}{u} &\text{By Chain Rule}\\ \frac{dy}{dx}&=\frac{2x}{x^2}\\ \frac{dy}{dx}&=\frac{2}{x}\\ \end{align} \]

Team Assessment

  1. Solve these equation

\[ \begin{align} \text{Differentiate: A) }f(x)=x \ln x& &\text{B) }5+\ln(3x)=7 & &\text{C) } e^{5x-0.2}=10 \end{align} \]

  1. You contribute monthly to your retirement a company. After leaving the company, you no longer contribute, but the fund continues to accrue interest until you can remove it without penalty at age 55.

The increase in your funds is given by: \[S=122000e^{0.032 t}\]

where S is the amount in your retirement account t years after leaving the company.

How many years after you quit will your retirement account be earning $8000/year in interest?

  1. Why can’t logarithms have a negative x value?

Integration Conceputally

How do we find the area under this curve?


We can approximate the area by summing the area of easy to calculate rectangles


How do we make the rectangles


  1. Start at one end of the interval \([a,b]\)

  2. Evaluate the function at \(f(a)\)

  3. Step away from \(a\) by some small amount called \(\Delta x\)

  4. Multiply \(f(a)\Delta x\)

  5. Repeat the same steps above, but keep moving the function evaluation to new intervals

  6. Sum up all (k) rectangles

\[ \text{Area}=f(x_1)\Delta x+f(x_2)\Delta x+...f(x_k)\Delta x \]

This is called a Reimann Sum

Example of Reimann Sum


Approximate the area under the curve from \([-3,3]\) with \(\Delta x=1\) and \(k=6\)

x y
-3 11
-2 18
-1 13
0 2
1 -9
2 -14
3 -7

Expanding Reimann Sums


  • What if we try to make \(\Delta x\) really small and the number of rectangles really big \((k\to \infty)\)?

  • Our estimation of the Area will get better and better with more rectangles

Take the limits to infinity


Take the area calculation we did before, but with infinitely many \(ks\)

\[ \large \lim_{k\to\infty}R(f(x),\Delta x)=\text{True Area} \]

We formally call this an integral with the following notation:

\[ \large \int^b_af(x)dx \]

Verbally:

The Integral of \(f(x)\) from \(a\) to \(b\) with respect to \(x\)

How do we calculate


  • Taking infinite sums is tedious to impossible by hand


  • Luckily the \(dx\) portion hints at the way to solve integrals

Fundamental Theorem of Calculus


If \(f(x)\) is continuous over an interval \([a,b]\), and the function \(F(x)\) is defined by:

\[ \large F(x)=\int^x_af(t)dt \]

then \(F'(x)=f(x)\) over \([a,b]\)

Fundamental Theorem of Calculus means that Integrals are just Anti-Derivatives


If we integrate a derivative, we should get the same function back as the original vice-versa

\[ \begin{align} \frac{d}{dx}\left[\int f(x)dx\right]&=f(x) &\text{Differentiation is the inverse of integration} \end{align} \]

\[ \begin{align} \int f'(x)&=f(x)+C &\text{Integration is the inverse of differentiation} \end{align} \]

Where the heck did that C come from?


  • Start with \(x^2-4x+1\)

  • \(\frac{d}{dx}=2x-4\)

  • If we integrate, we’ll have \(x^2-4x+C\)

  • There is no way of knowing what the x-intercept should be without additional information

  • We have to solve with an initial value problem

Why is Integration Useful?


  • Convert from rate of changes to total values


  • Solve Differential Equations

    • i.e \(\frac{dy}{dx}=2x-4\)

    • Logistic Growth is one example


  • Total area of curves

    • Useful in policy evaluations

Integration is tough


Before integrating ask yourself:

  1. What am I trying to solve?


  1. Does it make sense to take an integral?

Rules of Integration

Follow many of the same rules for derivatives


Sum and Difference Rules

\[ \begin{align} \int[f(x)+g(x)]dx=\int f(x)dx+\int g(x)dx \\ \int[f(x)-g(x)]dx=\int f(x)dx-\int g(x)dx \end{align} \]

Rules of Integration


Constant Rules

\[ \begin{align} \int k dx&=kx+C \\ \int kf(x)dx&=k\int f(x)dx \end{align} \]

  • Second part says we can move multipliers outside the integration to simplify.

Rules of Integration


Power Rule

\[ \int x^ndx=\frac{x^{n+1}}{n+1}+C \text{, n}\ne1 \]

  • Workhorse rule of integration

Examples


\[ \begin{align} f(x)&=4 & &g(x)=2x^2 &f(x)=x^3-4x \end{align} \]

Initial Value Problems


  • To find the C terms, we need extra information

  • Often times that comes from being given an initial value

  • The start of the period we know that \(y(0)=a\) or \(y(12)=b\)

  • We use this information to solve for what C should be

Initial Value Problem: Example


The marginal cost of producing \(x\) units of a product is:

\[ \frac{dC}{dx}=25-0.02x \]

Where C is the cost ($), and x is the number of units produced. Given that producing 2 units of product costs $10, what is the complete cost equation?

\[ \begin{align} C(x)=&25x-\frac{.02x^2}{2}+D & \text{Solve with Power Rule}\\ 10&=25(2)-\frac{0.02(2)^2}{2}+D &\text{ Sub in x=2}\\ -39.96&=D\\ C(x)&=25x-\frac{0.2x^2}{2}-39.96 \end{align} \]

Definite vs indefinite integrals


  • Definite integrals have start and end values (aka bounds)

  • We must evaluate between the intervals by

\[ \begin{align} \int^b_axdx\\ \frac{1}{2}x^2|^b_a\\ \frac{1}{2}(b)^2-\frac{1}{2}(a)^2 \end{align} \]

  • Indefinite Integrals no bounds

  • Need initial values to find integration constants

\[ \int f(x)dx \]

Definite Integral: Example


\[ \begin{align} \int^2_{-1}3x^2dx \\ x^3|^2_{-1}\\ (2)^3-(-1)^3=9 \end{align} \]

Area between curves


Area between curves example


Find the area of the shaded region in the graph below

Area between curves example


\[ \small \begin{align} \int^1_0 \sqrt{x}=\frac{2}{3}x^\frac{3}{2} \\ \int^1_0 x^2=\frac{1}{3}x^3 \end{align} \]

  • Then get the area of each by solving the definite integral

\[ \small \begin{align} \frac{2}{3}(1)^{\frac{3}{2}}-\frac{2}{3}(0)^{\frac{3}{2}}=\frac{2}{3}\\ \frac{1}{3}(1)^3-\frac{1}{3}(0)^3=\frac{1}{3} \end{align} \]

  • Then subtract the upper from the lower

\[ \small \frac{2}{3}-\frac{1}{3}=\frac{1}{3} \]

Team Assessment

  1. Explain and demonstrate how to approximate the area under the curve \(f(x)=-9x^3+3x-9\) on the interval [4,10] using a Riemann sum with \(k=3\)

  2. Take the Integrals

\[ \begin{align} \text{A) }y=\frac{3}{x^2}, y(0)=5& &\text{B) }g(t)=3t^5-2t^3+16t-7 & &\text{C) } \int^4_2\frac{1}{2}x \end{align} \]

  1. A model for the rate of change in ozone concentrations over time between 1962-1984 is given by \(\frac{dC}{dt}=2t+20\). Where \(C\) is the ozone concentration (ppm) and t is the elapsed time in years. Given that in 1964 the ozone concentration was 30 ppm, what was the ozone concentration in 1982?